#pragma once

#include <QDialog>
#include <qglobal.h>

QT_BEGIN_NAMESPACE
class CPlugExtendDlgPrivate;
class QTreeWidgetItem;
QT_END_NAMESPACE

class CPlugExtendDlg : public QDialog
{
	Q_OBJECT
public:
	CPlugExtendDlg(QWidget *parent = nullptr);
	CPlugExtendDlg(QStringView plug_path, const QStringList& filenames, QWidget* parent = nullptr);
	~CPlugExtendDlg();
protected:
	void OnInitDialog();
private:
	void InitSlot();
	void FindPlugins(QStringView plug_path,const QStringList& filenames);
	void PopulateTreeWidget(QObject *plugin,QStringView text);
	void AddItems(QTreeWidgetItem* plug_item,const char* interface_name,const QStringList& features);
private:
	CPlugExtendDlgPrivate* const d_ptr;
	Q_DECLARE_PRIVATE(CPlugExtendDlg)
};
